package com.webmuseum.client;

import java.util.HashMap;


public class FieldManager 
{
	
	private static FieldManager mInstance = null;
	
	private HashMap<String, CommonFieldData> mFieldDataMap;
	
	private FieldManager()
	{
		mFieldDataMap = new HashMap<String, CommonFieldData >();
	}
	
	public static FieldManager getInstance()
	{
		if(mInstance == null)
		{
			mInstance = new FieldManager();
		}
		return mInstance;
	}
	
	public void addFieldData(String aFieldName, CommonFieldData aFieldData)
	{
		mFieldDataMap.put(aFieldName, aFieldData);
	}

	public CommonFieldData getFieldData(String aFieldName)
	{
		CommonFieldData d = null;
		if(mFieldDataMap.containsKey(aFieldName))
			d = mFieldDataMap.get(aFieldName);
		return d;
	}
	
}
